<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <body>
        <ui:composition template="../../../resources/sTemplate.xhtml">
            <ui:define name="content">
                <p:growl id="msgs" showDetail="true" />
                <div class="container" >
                    <h:form id="formDataTable">
                        <p:dataTable id="dataTable" 
                                     value="#{horariosTurnoBean.lista}" 
                                     var="var" 
                                     paginator="true" 
                                     rows="5"  
                                     paginatorPosition="bottom" 
                                     pageLinks="5"
                                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} {CurrentPageReport}"  
                                     rowsPerPageTemplate="5,10,20,30,50,100">

                            <p:column headerText="Turno" >  
                                <h:outputText value="#{var.TTurnos.turno}" />  
                            </p:column>

                            <p:column headerText="Dia de la Semana" >  
                                <h:outputText value="#{var.nombreDia}" />  
                            </p:column>

                            <p:column headerText="Entrada" >  
                                <h:outputText value="#{var.horaEntrada}" />  
                            </p:column>

                            <p:column headerText="Entrada" >  
                                <h:outputText value="#{var.horaSalida}" />  
                            </p:column>

                            <p:column style="width:4%">  
                                <p:commandButton id="selectButton" update=":formUpdate" 
                                                 oncomplete="PF('dialogUpdate').show()" icon="ui-icon-pencil" 
                                                 title="View" >  
                                    <f:setPropertyActionListener value="#{var}" target="#{horariosTurnoBean.objSeleccionado}" />  
                                </p:commandButton>  
                            </p:column>
                        </p:dataTable>
                    </h:form>
                    <ui:include src="horariosTurnoIns.xhtml" />
                    <ui:include src="horariosTurnoUpd.xhtml" />
                 </div>
            </ui:define>
        </ui:composition>
    </body>
</html>
